package com.bjar;

public class SuffixTree {

	private Node root;
	
	public SuffixTree(String workingString)
	{
		if (!workingString.endsWith("$"))
			throw new IllegalArgumentException("The string must end with '$'");
		if (workingString.indexOf("$") != workingString.length() - 1)
			throw new IllegalArgumentException("Only the last character may be '$'");
		
		root = new Node();

		
		Node currentNode = new Node(workingString);
		root.AddChild(currentNode);
		
		for(int i = 0; i < workingString.length(); i++)
		{
			String u = "";
			String v = "";
			String w = "";
			if(!currentNode.HeadIsEmpty())
			{
				
			}
			else
				w = v.substring(0, v.length());
			
			
				
			
		}
		
	}
	

}
